import request from '@/utils/request'

/**
 * 获取目录
 * @param {*} id
 */
export function read(id) {
  return request({
    url: '/api/dir/items/' + id,
    method: 'get'
  })
}

/**
 * 添加目录
 * @param {*} id
 */
export function save(param) {
  return request({
    url: '/api/dir/items/',
    method: 'post',
    data: param
  })
}


/**
 * 删除目录
 * @param {目录id} id
 */
export function destroy(id) {
  return request({
    url: '/api/dir/items/' + id,
    method: 'delete'
  })
}
